package com.keyinong.park.contactsfragment.sett;

import java.util.Comparator;

import com.keyinong.parkcontactsbean.ContactsBean;

/**
 * 
 * @author xiaanming
 *
 */
public class PinyinComparator implements Comparator<ContactsBean> {

	public int compare(ContactsBean o1, ContactsBean o2) {
		if (o1.getLetter().equals("@")
				|| o2.getLetter().equals("#")) {
			return -1;
		} else if (o1.getLetter().equals("#")
				|| o2.getLetter().equals("@")) {
			return 1;
		} else {
			return o1.getLetter().compareTo(o2.getLetter());
		}
	}

}
